package io.file;

import java.io.File;
import java.io.FilenameFilter;

public class FileDemo2T {
    public static void main(String[] args) {
        String bassDir="src/io/file/ft";
        FilenameFilter filenameFilter=new FilenameFilter(){
            @Override
            public boolean accept(File dir, String name) {

                return name.endsWith(".txt");
            }
        };
        String regx="ffs";
        String replacement="xxx";
        boolean result=FileDemo2.renameTo(bassDir,filenameFilter,regx,replacement);
        System.out.println("result = " + result);
    }
}
